package com.itheima.demo01;


import java.util.ArrayList;
import java.util.function.Consumer;

public class LambdaForDemo02 {
    public static void main(String[] args) {
        //lambda 遍历
        //1.创建集合
        ArrayList<String> list = new ArrayList<>();
        list.add("aa");
        list.add("bb");
        list.add("cc");
        list.add("ee");

        //2.遍历
        list.forEach(s -> System.out.println(s));

    }
}
